﻿using ComHlp.enums;

namespace ComHlp.ContentClasses
{
    public class ItxFileTransferResult
    {
        /// <summary> temp byte arreay - for 'small' server file responses
        /// - for chart it is immediatly parsed to chart data </summary>
        public byte[] FileBinaryResponse { get; set; }

        /// <summary> received data type, if we had a file transfer </summary>
        public ExternalServerDataType FileDataType { get; set; } = ExternalServerDataType.Unknown;

        /// <summary> path to received file if it was stored on disk instead of memory </summary>
        public string FilePath { get; set; }

        /// <summary> original received file name - for example for getfile / save file dialog</summary>
        public string OriginFileName { get; set; }

        /// <summary> in memory parsed chart data </summary>
        public ItxChartData ChartData { get; set; }

        /// <summary> error which occured when retrieving the file </summary>
        public string FileRetrieveError { get; set; }

        /// <summary> procedure to start if we received it - f.x. at itprtview </summary>
        public string ProcedurName { get; set; }


        public ItxFileTransferResult(string fileRetrieveError)
        {
            FileRetrieveError = fileRetrieveError;
        }

        public ItxFileTransferResult()
        {
        }
    }
}
